#include "loadArea.h"
#include "../framework.h"

Vertexf LoadArea::vertices[] = { Vertexf(-0.5f,-0.5f),Vertexf(-0.5f,0.5f),
						   	     Vertexf(0.5f,0.5f),Vertexf(0.5f,-0.5f)};

LoadArea::LoadArea(Rectangle rec)
	:	SceneObject(rec){
	this->objVertices.vertices = LoadArea::vertices;
	this->objVertices.nVertices = nVertices;
}

LoadArea::~LoadArea(){
}

void LoadArea::draw(){
	Framework& fr = Framework::instance();

	fr.pipeline.pushMatrix();
		fr.pipeline.translate(this->dimensions.centerX(),this->dimensions.centerY());
		fr.pipeline.escale(this->dimensions.width(),this->dimensions.height());
		fr.pipeline.draw(Pipeline::POLYGON,vertices,4);
	fr.pipeline.popMatrix();
}

